module.exports = `

  type Notification {
    id: ID!
    formId: String
    openId: String
    createdAt: String
    userId:Int
  }

  input NotificationData {
    title: String,
    data: JSON,
    url: String
  }

  input NotificationTarget {
    userId: Int,
    targetId: Int,
    scope: String
  }

  extend type Mutation {
    # Create a notification slot
    enqueueNotification(formId: String!): Notification
    # Remove and return a notification slot
    dequeueNotification: Notification
    # Send notification test
    sendNotification(data: NotificationData!, target: NotificationTarget!): Notification
  }

`
